#ifndef KEYBOARD_H
#define KEYBOARD_H


namespace Cvekas {

typedef unsigned char Key;
	
/// %Keyboard
class Keyboard : public boost::noncopyable
{
public:
	/// Constructor. You shouldn't call this, Input will provide access to %Keyboard
	Keyboard();

	/// Destructor
	virtual ~Keyboard();

	/// Refreshes keyboard data. Must be called once each frame
	void update();

	/// Returns true if Key is being held down
	bool isKeyPressed(Key key) const;
	/// Returns true if Key just went from state "down" to state "up"
	bool isKeyUp(Key key) const;
	/// Returns true if Key just went from state "up" to state "down"
	bool isKeyDown(Key key) const;

	/// See Input::process()
	bool process(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);

private:	
	bool keyboard[256];
	bool keyboard_current[256];
	bool keyboard_last[256];
};

typedef boost::shared_ptr<Keyboard> KeyboardPtr;

} // namespace

#endif